package org.mii.safeguard_v1.base.service.interf;

import java.io.Serializable;
import java.util.List;

import org.springside.modules.orm.Page;
import org.springside.modules.orm.PropertyFilter;

public interface IEntityManager<T, PK extends Serializable> {
	T get(final PK id);

	Page<T> getAll(final Page<T> page);

	List<T> getAll();

	List<T> getAllDistinct();

	Page<T> search(final Page<T> page, final List<PropertyFilter> filters);

	void save(final T entity);

	void delete(final PK id);

	T findByUniqueProperty(String propertyName, Object val);

	@SuppressWarnings("unchecked")
	List findByHql(String hql, Object... values);
}
